package com.zqu.service.impl;

import com.zqu.mapper.PManagerment.ProductMaintenanceMapper;
import com.zqu.pojo.ProductMaintenance;
import com.zqu.service.ProductMaintenanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductMaintenanceServiceImpl implements ProductMaintenanceService {

    @Autowired(required = false)
    private ProductMaintenanceMapper productMaintenanceMapper;

    @Override
    public ProductMaintenance selectProductMaintenanceById(long id) {
        return productMaintenanceMapper.selectTById(id);
    }

    @Override
    public List<ProductMaintenance> selectList(ProductMaintenance productMaintenance) {
        return productMaintenanceMapper.selectList(productMaintenance);
    }

    @Override
    public boolean insertProductMaintenance(ProductMaintenance productMaintenance) {
        return productMaintenanceMapper.insertT(productMaintenance)>0;
    }

    @Override
    public boolean updateProductMaintenance(ProductMaintenance productMaintenance) {
        return productMaintenanceMapper.updateT(productMaintenance)>0;
    }

    @Override
    public boolean deleteProductMaintenance(long id) {
        return productMaintenanceMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteProductMaintenanceByIds(String[] ids) {
        return productMaintenanceMapper.deleteTByIds(ids)>0;
    }
}
